import Vue from 'vue';
import Vuex from 'vuex';
import {
    ADD_COUNT,
    ADD_COUNT_SYNC
} from './mutation-types'

Vue.use(Vuex);


export const store = new Vuex.Store({
    state:{
        count:0,

        status:0,

        t:2700000,

        message: {
            time:2700000,
        }
    },

    mutations:{
        'CHANGE_STATUS'(state,payload) {
            state.status = payload;
        }
    },

    actions: {
        changeStatus:({commit},payload) => {
            return new Promise(resolve => {
                commit('CHANGE_STATUS',payload);
                resolve();
            })
        }
    }
});
